package com.aerotechnic.models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

@Entity
@Table(name = "Mecanicien")
public class Mecanicien extends Personne {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	// sa specialite
	@Column(name="Specialite")
	private String spec;
	
	// son leader
	@Column(name="Leader")
	private Mecanicien leader;
	
	//***********links*************
	
	@ManyToOne(fetch = FetchType.EAGER, targetEntity = Ressource.class)
	private Ressource ressource;
	
	// getter and setters
	public String getSpec() {
		return spec;
	}
	public void setSpec(String spec) {
		this.spec = spec;
	}
	public Mecanicien getLeader() {
		return leader;
	}
	public void setLeader(Mecanicien leader) {
		this.leader = leader;
	}
	public Ressource getRessource() {
		return ressource;
	}
	public void setRessource(Ressource ressource) {
		this.ressource = ressource;
	}

}
